<template>
    <div class="container">
        <h3>投诉管理</h3>
        
        <el-table
            :data="tableData"
            border
            style="margin-top:20px;"
            ref="multipleTable"
            header-cell-class-name="table-header"
        >
            <el-table-column prop="createtime" sortable label="时间"></el-table-column>
            <el-table-column prop="content" sortable label="内容"></el-table-column>
            <!-- <el-table-column prop="type" sortable label="类别"></el-table-column>
            <el-table-column prop="buyTime" sortable label="购买时间"></el-table-column>
            <el-table-column sortable label="规格">
                <template slot-scope="scope">{{scope.row.spec}}{{scope.row.specUnits}}</template>
            </el-table-column>
            <el-table-column sortable label="剩余数量"> 
                <template slot-scope="scope">{{scope.row.surplusNumber}}{{scope.row.units}}</template>
            </el-table-column> -->
           <!-- <el-table-column label="操作" width="150" align="center">
                <template slot-scope="scope">
                    <el-button
                        type="text"
                        v-if="!edit"
                        @click="handleEdit(scope.$index, scope.row)"
                    >编辑</el-button>
                    <el-button
                        type="text"
                        v-if="!check"
                        @click="handleCheck(scope.$index, scope.row)"
                    >查看</el-button>
                </template>
            </el-table-column> -->
        </el-table>
        <el-pagination
            layout="total, prev, pager, next, jumper"
            :page-size="pagesize"
            :current-page.sync="currentPage"
            :total="total"
            @current-change="handleCurrentChange"
            style="margin-top:20px"
        ></el-pagination>
    </div>
</template>
<script>
import { getcomplaint } from '@/request/api';
export default {
    data() {
        return {
            added: true,
            total: 0,
            currentPage: 1,
            pagesize: 10,
            searchName: '',
            tableData: [],
            form: {},
            idx: -1,
            id: -1,
            boxCode: '',
            boxCode1: '',
            del: true,
            check: true,
            edit: true,
            action: ''
        };
    },
    mounted() {
        this.init();
        // this.judgmentAuthority()
    },
    methods: {
       
        handleCurrentChange(val) {
            this.currentPage = val;
            this.init();
        },
        init() {
            var params = {
                // inputsName: this.searchName,
                page: this.currentPage
            };
            getcomplaint(params).then((res) => {
                // if (res.code == 200) {
                    this.tableData = res.rows;
                    this.total = res.total;
                // }
            });
        },
     
       
       
    }
};
</script>

<style scoped lang="less">
/deep/.upload-daoru {
    background: #eee;
    .el-upload {
        border: none;
        width: auto;
        height: auto;
        border-radius: 0;
        float: right;
        margin-right: 10px;
    }
}
.el-table {
    margin-top: 20px;
}
.el-pagination {
    text-align: center;
}
.el-pagination {
    text-align: center;
}
.el-col {
    margin-bottom: 0;
}
.avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    width:180px;
    overflow: hidden;
  }
  
  .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }
  .el-upload--text{
      width:180px;
  }
  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;
  }
  .avatar {
    width: 178px;
    height: 178px;
    display: block;
  }
</style>